<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Resource PreEdit</title>
        <#include "../editCss.ftl">

	</head>
	<body class="no-skin">
		<div class="container-fluid">
			<div class="row">
			  <div class="breadcrumbs">
				<ul class="breadcrumb">
					<li><i class="ace-icon fa fa-home home-icon"></i><a href="${request.contextPath}/index.jspx" target="_top">首页</a></li>
					<li><a href="">系统管理</a></li>
					<li><a href="list.jspx">资源信息</a></li>
					<li class="active">修改</li>
				</ul>
				  <!-- /.breadcrumb -->
			  </div>
			  <!-- /.breadcrumbs -->
			</div>
			<!-- /.row -->
			<div class="row">
				<div class="page-content">
					<div class="page-header">
						<h1>资源信息修改</h1>
					</div>
					<div class="row">
						<div class="col-xd-12">
						    <form action="edit.jspx" method="post" class="form-horizontal" role="form" id="form-data">
						    	<div class="form-group">
						    	
									<label class="col-sm-2 control-label no-padding-right"> 资源名称  </label>
									<div class="col-sm-4">
										<input type="hidden" id="id" name="id" value="${(resource.id)!0}">
										<input type="text" id="name" name="name" placeholder="名称" value="${(resource.name)!}" class="form-control" />
									</div>
									
									<label class="col-sm-2 control-label no-padding-right"> 资源显示图标  </label>
									<div class="col-sm-4">
										<input type="text" id="style" name="style" placeholder="资源显示图标" class="form-control" value="${(resource.style)!'fa-tachometer'}"/>
									</div>
								</div>
								<div class="space-4"></div>
								<div class="form-group">
									<label class="col-sm-2 control-label no-padding-right"> 上一级资源  </label>
									<div class="col-sm-4">
										<select id="parentid" name="parentid">
											<option value="0" selected>一级资源</option>
											<#list parents! as parent>
											<option value="${(parent.id)!0}">${(parent.name)!}</option>
											</#list>
										</select>
									</div>
									
									<label class="col-sm-2 control-label no-padding-right"> 排序号  </label>
									<div class="col-sm-4">
										<input type="text" id="orderid" name="orderid" placeholder="排序号" value="${(resource.orderid)!0}"/>
									</div>
								</div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label no-padding-right"> 链接地址  </label>
									<div class="col-sm-6">
										<input type="text" id="linkurl" name="linkurl" value="${(resource.linkurl)!''}" class="form-control">
									</div>
								</div>
								
								<div class="form-group">
									<label class="col-sm-2 control-label no-padding-right"> 权限字符串 </label>
									<div class="col-sm-2">
										<input type="text" id="permission" name="permission" value="${(resource.permission)!'none'}">
									</div>
									
									<label class="col-sm-2 control-label no-padding-right"> 有效性  </label>
									<div class="col-sm-2">
										<label><input type="radio" id="available_0" name="available" value="0"> 无效</label>
										<label><input type="radio" id="available_1" name="available" value="1"> 有效</label>
									</div>
									
									<label class="col-sm-2 control-label no-padding-right"> 资源标识 </label>
									<div class="col-sm-2">
										<input type="text" id="identity" name="identity" value="${(resource.identity)!'none'}">
									</div>
								</div>

								<div class="form-group">
									<label class="col-sm-2 control-label no-padding-right"> 添加时间 </label>
									<div class="col-sm-4">
										<input type="text" id="addtime" name="addtime" value="${(resource.addtime)!.now}">
									</div> 
									
									<label class="col-sm-2 control-label no-padding-right"> 修改时间 </label>
									<div class="col-sm-4">
										<input type="text" id="edittime" name="edittime" value="${.now}">
									</div> 
								</div>
								
								<div class="clearfix form-actions">
									<div class="col-sm-offset-2 col-sm-4">
										<button type="reset" class="btn">
											<i class="ace-icon fa fa-undo bigger-110"></i>
											重置
										</button>
										&nbsp;&nbsp;
										<button type="submit" class="btn btn-info">
											<i class="ace-icon fa fa-check bigger-110"></i>
											提交
										</button>
									</div>
								</div>
						    </form>
					    </div>
					</div>
					<!-- /.row -->
				</div>
				<!-- /.page-content -->
			</div>
		</div>
		<#include "../editJs.ftl">

		<script>
			$(document).ready(function(){
				var options={
					isEdit:true
					,parentid:${(resource.parentid)!0}
                    ,available:${(resource.available)!0}
				};
				manage.Resource.Edit.init(options);
			});
		</script>
	</body>
</html>